/* 声破天搜索页样式 */

/* 搜索页内容容器 */
.search-content {
    padding: 20px 32px 90px;
    color: #fff;
}

/* 搜索框样式 */
.search-box-container {
    margin-bottom: 24px;
}

.search-box {
    position: relative;
    background-color: #242424;
    border-radius: 500px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    max-width: 600px;
}

.search-box i.fa-search {
    font-size: 18px;
    color: #b3b3b3;
    margin-right: 12px;
}

#search-input {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    padding: 8px 0;
    width: 100%;
    outline: none;
}

#search-input::placeholder {
    color: #b3b3b3;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    display: none;
}

.search-box:focus-within {
    outline: 2px solid #fff;
}

/* 分类导航栏 */
.search-category-nav {
    margin-bottom: 32px;
}

.category-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tab {
    background-color: #242424;
    border-radius: 500px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.category-tab:hover {
    background-color: #2a2a2a;
}

.category-tab.active {
    background-color: #fff;
    color: #000;
}

/* 搜索历史部分 */
.search-history-section {
    margin-bottom: 32px;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.search-section-header h2 {
    font-size: 24px;
    margin: 0;
}

.clear-history-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 500px;
    transition: all 0.2s;
}

.clear-history-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    display: flex;
    align-items: center;
    background-color: #242424;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: #2a2a2a;
}

.history-icon {
    margin-right: 16px;
    color: #b3b3b3;
}

.history-text {
    flex-grow: 1;
    font-size: 16px;
}

.remove-history {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .remove-history {
    opacity: 1;
}

/* 搜索结果区域 */
.search-results-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-areas:
        "top-result songs"
        "artists artists"
        "albums albums"
        "playlists playlists";
    gap: 24px;
}

/* 热门结果 */
.top-result-section {
    grid-area: top-result;
}

.top-result-card {
    background-color: #181818;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: background-color 0.2s;
    height: calc(100% - 40px);
    max-height: 300px;
}

.top-result-card:hover {
    background-color: #282828;
}

.top-result-card img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.top-result-title {
    font-size: 28px;
    font-weight: bold;
    margin: 8px 0;
}

.top-result-artist {
    font-size: 16px;
    color: #b3b3b3;
    margin: 4px 0;
}

.top-result-type {
    font-size: 14px;
    color: #b3b3b3;
    margin: 4px 0;
    background-color: rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
}

.play-top-result {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #1DB954;
    color: black;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    transform: translateY(8px);
}

.top-result-card:hover .play-top-result {
    opacity: 1;
    transform: translateY(0);
}

.play-top-result:hover {
    transform: scale(1.05);
    background-color: #1ed760;
}

/* 歌曲结果 */
.songs-result-section {
    grid-area: songs;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.song-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.song-rank {
    width: 24px;
    color: #b3b3b3;
    font-size: 16px;
    text-align: center;
    margin-right: 16px;
}

.song-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 16px;
}

.song-info img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 16px;
}

.song-details {
    min-width: 0;
}

.song-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 14px;
    color: #b3b3b3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-album {
    color: #b3b3b3;
    font-size: 14px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.song-duration {
    color: #b3b3b3;
    font-size: 14px;
    margin: 0 16px;
}

.song-actions {
    display: flex;
    opacity: 0;
    transition: opacity 0.2s;
}

.song-item:hover .song-actions {
    opacity: 1;
}

.song-action-btn {
    background: none;
    border: none;
    color: #b3b3b3;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.song-action-btn:hover {
    color: #fff;
}

/* 艺术家结果 */
.artists-result-section {
    grid-area: artists;
}

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.artist-card {
    background-color: #181818;
    border-radius: 8px;
    padding: 20px;
    transition: background-color 0.2s;
    text-align: center;
}

.artist-card:hover {
    background-color: #282828;
}

.artist-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 16px;
    position: relative;
}

.artist-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 8px 0;
}

.artist-card p {
    font-size: 14px;
    color: #b3b3b3;
    margin: 4px 0;
}

/* 专辑结果 */
.albums-result-section {
    grid-area: albums;
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.album-card {
    background-color: #181818;
    border-radius: 8px;
    padding: 20px;
    transition: background-color 0.2s;
}

.album-card:hover {
    background-color: #282828;
}

.album-img {
    width: 140px;
    height: 140px;
    position: relative;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.album-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1DB954;
    color: black;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    transform: translateY(8px);
}

.album-card:hover .play-button {
    opacity: 1;
    transform: translateY(0);
}

.play-button:hover {
    transform: scale(1.05);
    background-color: #1ed760;
}

.album-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.album-card p {
    font-size: 14px;
    color: #b3b3b3;
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 播放列表结果 */
.playlists-result-section {
    grid-area: playlists;
}

.playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.playlist-card {
    background-color: #181818;
    border-radius: 8px;
    padding: 20px;
    transition: background-color 0.2s;
}

.playlist-card:hover {
    background-color: #282828;
}

.playlist-img {
    width: 140px;
    height: 140px;
    position: relative;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.playlist-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-card p {
    font-size: 14px;
    color: #b3b3b3;
    margin: 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 浏览全部分类 */
.browse-categories {
    margin-top: 32px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.category-card {
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.category-card:hover {
    transform: scale(1.04);
}

.category-card h3 {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    z-index: 1;
}

.category-card img {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    object-fit: cover;
    transform: rotate(25deg) translate(15%, -2%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.view-all {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.2s;
}

.view-all:hover {
    color: #fff;
}

/* 响应式调整 */
@media (min-width: 1200px) {
    .song-album {
        display: block;
    }
    
    .search-results-container {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 992px) {
    .search-results-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "top-result"
            "songs"
            "artists"
            "albums"
            "playlists";
    }
    
    .top-result-card {
        max-height: none;
    }
}

@media (max-width: 768px) {
    .artists-grid,
    .albums-grid,
    .playlists-grid,
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .artist-img,
    .album-img,
    .playlist-img {
        width: 120px;
        height: 120px;
    }
    
    .category-card {
        height: 140px;
    }
    
    .category-card h3 {
        font-size: 20px;
    }
    
    .song-duration {
        display: none;
    }
}

@media (max-width: 576px) {
    .search-content {
        padding: 16px 16px 90px;
    }
    
    .artists-grid,
    .albums-grid,
    .playlists-grid,
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    
    .artist-img,
    .album-img,
    .playlist-img {
        width: 100px;
        height: 100px;
    }
    
    .artist-card,
    .album-card,
    .playlist-card {
        padding: 12px;
    }
    
    .category-card {
        height: 100px;
    }
    
    .category-card h3 {
        font-size: 16px;
    }
    
    .top-result-card img {
        width: 64px;
        height: 64px;
    }
    
    .top-result-title {
        font-size: 24px;
    }
} 